<?php
/**
 * Arrow exception
 *
 * @license  GNU GPL
 * @author   Artur Kmera <artur.kmera@arrowplatform.org>
 */

class ArrowException extends Exception {

	public function __construct($errorData, $errorCode = 0) {
		if( is_array($errorData) )
			parent::__construct(serialize($errorData), $errorCode);
		else 
			parent::__construct(serialize( array( "msg" => $errorData ) ), $errorCode);		
	}
	
	public function getMessageArray(){
		return  unserialize(parent::getMessage());
	}

}
?>